{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "9f6e91ad",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\python_code\\template-matching-ocr\\ocr_template_match.py:47: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.\n",
      "  refCnts = myutils.sort_contours(refCnts, method=\"left-to-right\")[0] #排序，从左到右，从上到下\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(10,)\n",
      "(189, 300)\n",
      "Credit Card Type: MasterCard\n",
      "Credit Card #: 5476767898765432\n"
     ]
    }
   ],
   "source": [
    "%run ocr_template_match.py -i ./images/credit_card_05.png -t ./images/ocr_a_reference.png"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f79502b6",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0443177f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
